<include file="Public:header"/> 
<div id="content">
	<div id="content-header">
		<h1>评论列表</h1>
	</div>
	<div id="breadcrumb">
		<a href="#" title="回到首页" class="tip-bottom"><i class="fa fa-home"></i> 首页</a>
		<a href="#">互动管理</a>
		<a href="#" class="current">评论列表</a>
	</div>
	<div class="row">
		<div class="col-xs-12">
			<div class="widget-box">
				<div class="widget-title">
					<span class="icon">
						<i class="fa fa-th"></i>
					</span>
					<h5>评论列表</h5>
					<span class="label label-info">{$num} 条 </span>
				</div>
				<div class="widget-content">
					<table class="table table-bordered table-striped table-hover with-check">
						<thead>
							<tr>
								<th width="5%">编号</th>
								<th width="10%">评论人</th>
								<th width="40%">评论内容</th>
								<th width="15%">评论时间</th>
								<th width="15%">是否回复</th>
								<th width="15%">操作</th>
							</tr>
						</thead>
						<tbody>
							<volist name="List" id="k">
							<tr>
								<td class="id">{$k.g_id}</td>
								<td>{$k.g_name}</td>
								<td>{$k.g_content|reFace|strip_tags|msubstr=0,120,'utf-8',true}</td>
								<td>{$k.g_time|getTime}</td>
								<td>
									<eq name="k['g_rtime']" value="0">
										<span class=" btn-dark-red btn-xs">未处理</span>
										<else />
										<span class=" btn-dark-green btn-xs">已处理</span>
									</eq>
								</td>
								<td>
									<a class="btn btn-success btn-sm" href="{:U('Admin/Gust/gustEdit',array('id'=>$k['g_id']))}">编辑</a>&nbsp;&nbsp;
									<button class="btn btn-danger btn-sm delgust">删除</button>
								</td>
							</tr>
							</volist>	
						</tbody>
					</table>
					{$page}
				</div>
			</div>

		</div>
	</div>
</div>
<include file="Public:footer"/> 
<script>
$(document).ready(function(){
	$(".delgust",this).click(function(){
		var id = $(this).parents("tr").find(".id").text();
		$(".delgust").attr("disabled",true);
		$.ajax({
			type:"post",
			url:"/Admin/Gust/gustDel",
			async:true,
			data:{"id":id},
			success:function(data){
				if(data.error==0){
					succ("完成!",data.msg,"__SELF__");
				}else{
					err("错误!",data.msg);
					$(".delgust").removeAttr('disabled');
				}
			},
		});
	});
});
</script>
</body>
</html>
